package com.foreknow.demo4;

import java.util.Scanner;

public class LoopDemo3 {
    public static void main(String[] args) {
        System.out.println("xxx管理系统");
        System.out.println("************************");
        System.out.println("1. 客户信息管理");
        System.out.println("2. 购物结算");
        System.out.println("3. 反馈");
        System.out.println("4. 注销");
        System.out.println("************************");
        Scanner input = new Scanner(System.in);
        System.out.println("请输入选择的数字: ");
        boolean isRight;
        do {
            isRight = true;
            int choice = input.nextInt();
            if(choice == 1) {
                System.out.println("客户信息管理");
            }else if(choice == 2) {
                System.out.println("购物结算");
            }else if(choice == 3) {
                System.out.println("反馈");
            }else if(choice == 4) {
                System.out.println("注销");
            }else {
                System.out.println("输入错误，请重新输入数字！！！");
                isRight = false;
            }
        }while(!isRight);
        System.out.println("程序结束......");



    }
}
